package com.zyy.dept.service.impl;

import com.zyy.dept.entity.Dept;
import com.zyy.dept.mapper.DeptMapper;
import com.zyy.dept.service.DeptService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 部门表 服务实现类
 * </p>
 *
 * @author zyy
 * @since 2023-02-07
 */
@Service
public class DeptServiceImpl implements DeptService {

    private final DeptMapper deptMapper;

    public DeptServiceImpl(DeptMapper deptMapper) {
        this.deptMapper = deptMapper;
    }


    @Override
    public List<Dept> getAll() {
        return deptMapper.getAll();
    }


    @Override
    public Dept getByNo(long deptNo) {
        return deptMapper.getByNo(deptNo);
    }

    @Override
    public Integer addDept(Dept dept) {
        return deptMapper.addDept(dept);
    }
}
